/**
 * @description  : 无证户档案-办证信息
 * @descriptionDetail : 办证信息
 * @copyright    : 浙江烟草
 * @author       : mc
 * @create       : 2022-12-05 15:11:24
 */
<template>
  <view>
    <view class="retail">
      <fsection :title="title.basemsg" class="pl-16"></fsection>
      <u-gap :height="$theme.cm_section_top_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
    </view>
    <view class="ordermsg">
      <mescroll-list
        :i="0"
        :index="0"
        :height="getListViewHeight()"
        :load-data="myLoadData"
        :init-load="false" 
        ref="mescrollItem"
        class="listview"
      > 
        <template slot-scope="d">
          <item-business-handle :relInfo="d.data"></item-business-handle> 
        </template>
      </mescroll-list>
    </view>
  </view>
</template>

<script>
import fsection from "@/components/form-section";
import mescrollList from '@/components/mescroll_list.vue';
import itemBusinessHandle from "./common/itemBusinessHandle";
import queryService from "@/service/check/query.service"
import {L_SUBJECT_TYPE,} from '@/service/check/mapping/enum.js'
const listObj = [{
  applyCode:1234567896541233,
  companyName:'企业名称',
  licNo:'许可证号',
  managerName:'负责人(经营者)',
  applyType:'办理类型',
  applyDate:'申请时间',
  acceptFinishDate:'受理日期',
  handleCurrentName:'办理阶段',
  handleResultName:'行政决定',
  decideDate:'决定日期',
},]
export default {
  components:{
    fsection,
    mescrollList,
    itemBusinessHandle,
  },
  props:['retailerUuid',],
  data(){
    return{
      listObj,
      title:{
        basemsg:"办证记录",
      },
      customStyle:{
        padding:"20rpx 32rpx",
      },
      L_SUBJECT_TYPE:L_SUBJECT_TYPE,
    }
  },
  mounted(){
  },
  methods:{
    getListViewHeight(){
      let p = (this.$u.sys().windowHeight - 44 - uni.upx2px(104) - uni.upx2px(120) - 8 - this.$u.sys().statusBarHeight) + "px";
      // #ifdef H5-DINGDING
      p = (this.$u.sys().windowHeight - uni.upx2px(104) - uni.upx2px(120) - 8 - this.$u.sys().statusBarHeight) + "px";
      // #endif
      return p;
    },
    myLoadData(page){
      let param = {
        retailerUuid:this.retailerUuid,
        subjectType:L_SUBJECT_TYPE.UN_LICENSE,
      };
      return new Promise((resolve) => {
        queryService.businessRecordList(page.num, page.size, param).then(res => {
          if(res.success){
            resolve({
              totalCount: res.count,
              data: [...res.data,],
            });
          } else {
            resolve({
              totalCount: 0,
              data: [],
            })
          }
        }).catch(e => {
          resolve({
            totalCount: 0,
            data: [],
          })
        })
      });
    },
  },
  
}
</script>

<style lang="scss" scoped>
@import "../unlicense_item.scss";
.head-title{
    padding: 0rpx 12rpx 0rpx 12rpx;
    font-size:$cm_form_item_label_font_size;
    font-weight: bold;
}
.left-icon{
    margin: 0rpx 10rpx;
    width: 9rpx;
    height: 32rpx;
    background: $u-type-primary;
    opacity: 1;
    border-radius: 5px;
    display: inline-block;
}
.case-info{
  font-size:$cm_form_item_label_font_size;
}
.case-content{
  padding:5px 0px;
}
.ordermsg{
  position: relative;
  padding: 0rpx 28rpx 10rpx 28rpx;
  margin:10rpx 0rpx;
  background-color: #fff;
}
.ipt{
  position:absolute;
  display: flex;
  float:right;
  display: flex;
  float: right;
  left: 201px;
  top: -48px;
  text-align: center;
}
</style>